using System;
using System.Collections.Generic;
using System.Text;

namespace StormCup_Qual
{
    class lfsracer
    {
        private string _username;
        private byte _connectionid;
        private byte _playerid;
        private string _playername;
        public lfsracer(string username, byte connectionid)
        {
            this._username = username;
            this._connectionid = connectionid;
        }
        public override string ToString()
        {
            return string.Format("{0} {1} {2} {3}", this.connectionid, this.playerid, this.username, this.playername);            
        }

        public byte connectionid
        {
            get { return _connectionid; }
            set { _connectionid = value; }
        }

        public byte playerid
        {
            get { return _playerid; }
            set { _playerid = value; }
        }

        public string username
        {
            get { return _username; }
            set { _username = value; }
        }

        public string playername
        {
            get { return _playername; }
            set { _playername = value; }
        }

        private Boolean _isadmin;

        public Boolean isadmin
        {
            get { return _isadmin; }
            set { _isadmin = value; }
        }

        private Boolean _isremote;

        public Boolean isremote
        {
            get { return _isremote; }
            set { _isremote = value; }
        }

        private Boolean _isvalid;

        public Boolean isvalid
        {
            get { return _isvalid; }
            set { _isvalid = value; }
        }

        private string _plate;

        public string plate
        {
            get { return _plate; }
            set { _plate = value; }
        }

        private Boolean _isracing;

        public Boolean isracing
        {
            get { return _isracing; }
            set { _isracing = value; }
        }

        private float speed;

        public float Speed
        {
            get { return speed; }
            set { speed = value; }
        }

        private float lastspeed = -1;

        public float LastSpeed
        {
            get { return lastspeed; }
            set { lastspeed = value; }
        }

        private int idle;

        public int Idle
        {
            get { return idle; }
            set { idle = value; }
        }

        private int timeschatted;

        public int chatted
        {
            get { return timeschatted; }
            set { timeschatted = value; }
        }

        private DateTime LastChat;

        public DateTime lastchat
        {
            get { return LastChat; }
            set { LastChat = value; }
        }

        private int LapNumber;

        public int lapnumber
        {
            get { return LapNumber; }
            set { LapNumber = value; }
        }

        private Boolean _signedAgreement;

        public Boolean signedAgreement
        {
            get { return _signedAgreement; }
            set { _signedAgreement = value; }
        }

        private TimeSpan Split1;

        public TimeSpan split1
        {
            get { return Split1; }
            set { Split1 = value; }
        }

        private TimeSpan Split2;

        public TimeSpan split2
        {
            get { return Split2; }
            set { Split2 = value; }
        }

        private TimeSpan Split3;

        public TimeSpan split3
        {
            get { return Split3; }
            set { Split3 = value; }
        }

        private TimeSpan LapTime = new TimeSpan(9, 9, 9);

        public TimeSpan laptime
        {
            get { return LapTime; }
            set { LapTime = value; }
        }

        private int Position;

        public int postion
        {
            get { return Position; }
            set { Position = value; }
        }

        public enum RacerQStatus
        {
            spectated,
            outlap,
            qualificationlap,
            inlap,
            finished
        };

        private RacerQStatus _status = RacerQStatus.spectated;

        public RacerQStatus Status 
        {
            get { return this._status; } 
            set { this._status = value; } 
        }

    }
}
